﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="TestLog.aspx.cs" Inherits="EXAM.Admin.Page_Admin.TestLog"  %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadPicker .RadInput
        {
            vertical-align: baseline;
        }
        .RadPicker .RadInput
        {
            vertical-align: baseline;
        }
        .RadPicker .RadInput
        {
            vertical-align: baseline;
        }
        .RadPicker .RadInput
        {
            vertical-align: baseline;
        }
        .RadGrid_Office2007 .rgHeader
        {
            color: #00156e;
        }
        .RadGrid_Office2007 .rgHeader
        {
            border: solid #5d8cc9;
            border-width: 0 0 1px 1px;
            background: 0 -2300px repeat-x #c3d8f1 url(       'mvwres://Telerik.Web.UI, Version=2010.3.1317.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Office2007.Grid.sprite.gif' );
        }
        .RadGrid .rgHeader
        {
            padding-top: 5px;
            padding-bottom: 4px;
            text-align: left;
            font-weight: normal;
        }
        .RadGrid .rgHeader
        {
            padding-left: 7px;
            padding-right: 7px;
        }
        .RadGrid .rgHeader
        {
            cursor: default;
        }
        .RadGrid_Office2007 .rgFilterRow
        {
            background: #d6e5f3;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlacebody" runat="server">
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
    </telerik:RadAjaxManager>
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
            <td align="center" class="formTitle">
                Test Log
            </td>
        </tr>
        <tr>
            <td>
                <telerik:RadTextBox ID="txtID" runat="server" Visible="False">
                </telerik:RadTextBox>
                <div>
                    User :
                    <telerik:RadComboBox ID="cboUser" runat="server" Height="200px" Width="200px" DropDownWidth="350px"
                        HighlightTemplatedItems="true" EnableLoadOnDemand="true" EmptyMessage="Choose a User"
                        OnItemsRequested="cboUser_ItemsRequested">
                        <HeaderTemplate>
                            <table style="width: 300px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 80px;">
                                        User Name
                                    </td>
                                    <td style="width: 177px;">
                                        First Name
                                    </td>
                                    <td style="width: 177px;">
                                        Last Name
                                    </td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table style="width: 300px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 80px;">
                                        <%# DataBinder.Eval(Container, "Text")%>
                                    </td>
                                    <td style="width: 177px;">
                                        <%# DataBinder.Eval(Container, "Attributes['Firstname']")%>
                                    </td>
                                    <td style="width: 177px;">
                                        <%# DataBinder.Eval(Container, "Attributes['Lastname']")%>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </telerik:RadComboBox>
                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="cboUser"
                        ErrorMessage="!" CssClass="validator">
                    </asp:RequiredFieldValidator>
                </div>
                <div>
                    From Date :
                    <telerik:RadDatePicker ID="dpCreateF" runat="server">
                    </telerik:RadDatePicker>
                    To Date :
                    <telerik:RadDatePicker ID="dpCreateT" runat="server">
                    </telerik:RadDatePicker>
                </div>
                <div>
                    <telerik:RadButton ID="btnSearch" runat="server" Text="Search" 
                        onclick="btnSearch_Click">
                    </telerik:RadButton>
                </div>
                <div>
                    <telerik:RadGrid ID="dgvList" runat="server" AutoGenerateColumns="False" GridLines="None"
                        Skin="Office2007" AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True"
                        ShowGroupPanel="True" OnNeedDataSource="dgvList_NeedDataSource" DataMember="dtQuest"
                        OnItemCommand="dgvList_ItemCommand">
                        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Office2007">
                        </HeaderContextMenu>
                        <GroupPanel Text="Drag a column header here to group by">
                        </GroupPanel>
                        <MasterTableView PageSize="20" DataKeyNames="Line" DataMember="dtQuest" EditMode="InPlace">
                            <DetailTables>
                                <telerik:GridTableView runat="server" DataKeyNames="Test_Log_Line,Answer_ID" DataMember="dtAnswer">
                                    <ParentTableRelation>
                                        <telerik:GridRelationFields DetailKeyField="Test_Log_Line" MasterKeyField="Line" />
                                    </ParentTableRelation>
                                    <CommandItemSettings ExportToPdfText="Export to Pdf" />
                                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                        <HeaderStyle Width="20px" />
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                        <HeaderStyle Width="20px" />
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="Test_Log_Line" FilterControlAltText="Filter column1 column"
                                            UniqueName="column1" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="Answer_ID" FilterControlAltText="Filter column2 column"
                                            HeaderText="AnswerID" UniqueName="column2" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="Rank" FilterControlAltText="Filter column3 column"
                                            HeaderText="Rank" UniqueName="column3">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="AnsName" FilterControlAltText="Filter column column"
                                            HeaderText="Answer Name" UniqueName="column">
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                    <EditFormSettings>
                                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                        </EditColumn>
                                    </EditFormSettings>
                                </telerik:GridTableView>
                            </DetailTables>
                            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                <HeaderStyle Width="20px"></HeaderStyle>
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                <HeaderStyle Width="20px"></HeaderStyle>
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridEditCommandColumn ButtonType="ImageButton" FilterControlAltText="Filter EditCommandColumn column">
                                    <ItemStyle CssClass="MyImageButton" />
                                </telerik:GridEditCommandColumn>
                                <telerik:GridBoundColumn DataField="No" FilterControlAltText="Filter column column"
                                    HeaderText="No" UniqueName="column110" Visible="False">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Line" FilterControlAltText="Filter column1 column"
                                    HeaderText="Line" ReadOnly="True" UniqueName="column111">
                                    <HeaderStyle Width="15px" />
                                    <ItemStyle Width="15px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Test_ID" FilterControlAltText="Filter column2 column"
                                    HeaderText="TestID" UniqueName="column112" Visible="False">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Question_ID" FilterControlAltText="Filter column column"
                                    HeaderText="QuestID" UniqueName="column2" Visible="False">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="QuestName" FilterControlAltText="Filter column1 column"
                                    HeaderText="Question" ReadOnly="True" UniqueName="column1">
                                </telerik:GridBoundColumn>
                                <telerik:GridNumericColumn DataField="Score" DecimalDigits="2" FilterControlAltText="Filter column4 column"
                                    HeaderText="Score" ReadOnly="True" UniqueName="column114" Aggregate="Sum">
                                </telerik:GridNumericColumn>
                                <telerik:GridDateTimeColumn DataField="Creation_Time_" DataFormatString="{0:dd/MM/yyyy}"
                                    FilterControlAltText="Filter column5 column" HeaderText="Creation" UniqueName="column115">
                                </telerik:GridDateTimeColumn>
                                <telerik:GridNumericColumn DataField="Display_Time" DecimalDigits="2" FilterControlAltText="Filter column6 column"
                                    HeaderText="Display(min)" UniqueName="column116" Visible="False">
                                </telerik:GridNumericColumn>
                                <telerik:GridNumericColumn DataField="Change_Time" DecimalDigits="2" FilterControlAltText="Filter column7 column"
                                    HeaderText="Change(min)" UniqueName="column117" Visible="False">
                                </telerik:GridNumericColumn>
                                <telerik:GridBoundColumn DataField="Type" FilterControlAltText="Filter column8 column"
                                    HeaderText="Type" ReadOnly="True" UniqueName="column118" Visible="False">
                                </telerik:GridBoundColumn>
                                <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" FilterControlAltText="Filter column column"
                                    Text="Delete" UniqueName="column3">
                                    <ItemStyle CssClass="MyImageButton" />
                                </telerik:GridButtonColumn>
                            </Columns>
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column" UniqueName="EditCommandColumn1">
                                </EditColumn>
                                <EditColumn ButtonType="ImageButton" />
                            </EditFormSettings>
                        </MasterTableView>
                        <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True">
                            <Selecting AllowRowSelect="True" />
                        </ClientSettings>
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                    </telerik:RadGrid>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
